package com.zhouxl.program.multi.seckill;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.JedisPool;

/**
 * @author zhouxl
 * @DATE 2021/7/12
 * @descriptoin
 */
@Configuration
@ConfigurationProperties(prefix = "com.example")
public class JedisConfig {

    String jedisHostIp = "192.168.52.128";
    int jedisHostPort = 6379;

    @Bean
    public JedisPool jedisPool(){
        return new JedisPool(jedisHostIp,jedisHostPort);
    }

}
